====================================================================
JOBHUNT NOTIFICATIONS - ARABIC TRANSLATION INSTRUCTIONS
====================================================================

WHAT WAS DONE:
--------------
1. Created Arabic translation file: jobhunt-notifications-ar.po
2. Compiled binary translation file: jobhunt-notifications-ar.mo
3. Fixed hardcoded "Submit" button text in JavaScript to use translations
4. All notification messages are now translatable

TRANSLATION FILES LOCATION:
--------------------------
/wp-content/plugins/jobhunt-notifications/languages/
  - jobhunt-notifications-ar.po  (human-readable translation file)
  - jobhunt-notifications-ar.mo  (compiled binary file - used by WordPress)
  - jobhunt-notifications.pot    (template file - contains all translatable strings)

HOW TO MODIFY TRANSLATIONS:
---------------------------
1. Open the .po file: jobhunt-notifications-ar.po
2. Find the English text you want to change (msgid line)
3. Update the Arabic translation (msgstr line)
4. Save the file
5. Recompile the .mo file using this command:
   cd /home/neftenergies/public_html/docroot.careers.qeyadasa.com/wp-content/plugins/jobhunt-notifications/languages
   msgfmt -o jobhunt-notifications-ar.mo jobhunt-notifications-ar.po
6. Clear your WordPress cache
7. Refresh your browser

EXAMPLE:
--------
English text in .po file:
  msgid "Submit"
  msgstr "إرسال"

To change "إرسال" to something else, just edit the msgstr line and recompile.

TRANSLATED NOTIFICATION MESSAGES:
---------------------------------
✓ "Email me jobs like these" → "أرسل لي وظائف مثل هذه عبر البريد الإلكتروني"
✓ "Job alert name..." → "اسم تنبيه الوظيفة..."
✓ "Submit" → "إرسال"
✓ "Please enter a valid email" → "يرجى إدخال بريد إلكتروني صالح"
✓ "Job alert successfully added." → "تمت إضافة تنبيه الوظيفة بنجاح."
✓ "Provided data is incomplete." → "البيانات المقدمة غير مكتملة."
✓ "A job already exists with this criteria" → "يوجد بالفعل تنبيه وظيفة بهذه المعايير"
✓ "Job alert successfully unsubscribed." → "تم إلغاء الاشتراك في تنبيه الوظيفة بنجاح."
✓ "You did not have any job alerts." → "ليس لديك أي تنبيهات وظائف."
✓ Daily/Weekly/Monthly/etc. → يومياً/أسبوعياً/شهرياً/etc.

And many more (see the .po file for the complete list)

IMPORTANT NOTES:
---------------
1. The Arabic translations are now active for the notifications plugin
2. Make sure your WordPress site language is set to Arabic (ar) in Settings > General
3. If translations don't appear:
   - Clear all caches (WordPress cache, browser cache, CDN cache)
   - Verify the .mo file exists and has proper permissions
   - Check that wp-config.php has: define('WPLANG', 'ar');
4. Always backup files before making changes

CODE CHANGES MADE:
-----------------
File: jobhunt-job-alerts.php (line 143-148)
  - Added 'submit_text' to wp_localize_script for JavaScript translation

File: assets/js/jobhunt-notifications.js (lines 55 and 61)
  - Changed hardcoded 'Submit' to use jobhunt_notifications.submit_text

TESTING:
--------
To test the translations:
1. Set your WordPress language to Arabic
2. Visit the job listing page
3. Click "Email me jobs like these" button
4. All notification messages should now appear in Arabic

NEED TO ADD MORE LANGUAGES?
---------------------------
To add another language (e.g., French):
1. Copy jobhunt-notifications-ar.po to jobhunt-notifications-fr_FR.po
2. Edit the header information (Language: fr_FR)
3. Translate all msgstr lines to French
4. Compile: msgfmt -o jobhunt-notifications-fr_FR.mo jobhunt-notifications-fr_FR.po

SUPPORT:
--------
For issues or questions, check:
- WordPress language settings in Settings > General
- Translation plugin like Loco Translate for easier editing
- File permissions (should be readable by web server)

====================================================================
Created: 2025-11-04
====================================================================


